package springcloud.service.impl;

import com.atguigu.springcloud.entities.Payment;
import org.springframework.stereotype.Service;
import springcloud.dao.PaymentDao;
import springcloud.service.PaymentService;

import javax.annotation.Resource;


@Service("paymentService")
public class PaymentServiceImpl implements PaymentService {
    @Resource
    private PaymentDao paymentDao;


    @Override
    public Payment queryById(Long id) {
        return this.paymentDao.getPaymentById(id);
    }


    @Override
    public Payment insert(Payment payment) {
        this.paymentDao.create(payment);
        return payment;
    }

}